﻿@model OrderMasterModel

@{
    Layout = "~/Views/Shared/_ContentLayout.cshtml";
}
@{
    var viewModel = Model ?? new OrderMasterModel();

}
<div style="margin:0 auto">
    <table class="definewidth m10">
        <tr>
            <td style="width:100%;font-size:24px;line-height:35px;font-weight:bold;text-align:center;">
                发货通知单
            </td>
        </tr>
        <tr>
            <td style="width:100%;font-size:14px;">
                订单编号：@viewModel.view_Order.order_NO<br />
                地址：@viewModel.aDZ_OrderAddress.address_desc<br />
                联系人：@viewModel.view_Order.receiver<br />
                电话：@viewModel.aDZ_OrderAddress.receiver_telephone<br />
                手机：@viewModel.aDZ_OrderAddress.receiver_telephone<br />
                邮编：<br />
                @if (viewModel.aDZ_OrderInvoiceRel != null)
                {
                    <div>
                        发票类型：@(MyEnumHelper.GetEnumItemDescription<InvoiceType>(viewModel.aDZ_OrderInvoiceRel.invoice_type.Value))<br />
                        发票抬头：@viewModel.aDZ_OrderInvoiceRel.invoice_title<br />
                        联系电话：@viewModel.aDZ_OrderInvoiceRel.invoice_phone<br />
                        纳税人识别号：@viewModel.aDZ_OrderInvoiceRel.taxpayer_ID<br />
                        公司名称：@viewModel.aDZ_OrderInvoiceRel.invoice_title<br />
                        公司地址：@viewModel.aDZ_OrderInvoiceRel.invoice_address<br />
                        银行名称：@viewModel.aDZ_OrderInvoiceRel.invoice_bankname<br />
                        银行帐号：@viewModel.aDZ_OrderInvoiceRel.invoice_bankno<br />
                    </div>
                }
                else
                {
                    <div>
                        发票类型：<br />
                        发票抬头：<br />
                        联系电话：<br />
                        纳税人识别号： <br />
                        公司名称：<br />
                        公司地址：<br />
                        银行名称：<br />
                        银行帐号：<br />
                    </div>
                }
            </td>
        </tr>
    </table>
    <table class="definewidth m10">
        <tr>
            <td style="width:100%;font-size:18px;line-height:24px;font-weight:bold;">商品信息： </td>
        </tr>
    </table>
    <style>
        .table-bordered {
            border-color: #000000;
        }

            .table-bordered th, .table-bordered td {
                border-left-color: #000000;
            }

        .table th, .table td {
            border-top-color: #000000;
        }
    </style>
    <table class="table table-bordered definewidth m10">

        <tr>
            <th>型号</th>
            <th>品牌</th>
            <th>批次号</th>
            <th>数量</th>
            @*<th>仓库</th>*@
            <th>单价</th>
        </tr>
        @{
            var heji = 0m;
        }
        @foreach (var item in viewModel.orderGoods)
        {
            heji += item.aDZ_OrderDetails.total_money.Value;
            var gonghuojia = item.views_Goods.supply_price * item.aDZ_OrderDetails.amount;
            <tr>
                <td>@item.views_Goods.MPN</td>
                <td>@item.views_Goods.brand_name</td>
                <td>@item.views_Goods.DCN</td>
                <td>@item.aDZ_OrderDetails.amount @item.views_Goods.goods_unit</td>
                @*<td>默认仓库</td>*@
                <td>@(Utils.MathRound((item.aDZ_OrderDetails.price * (1 + item.aDZ_OrderDetails.add_rate)).Value, 6))</td>
            </tr>
        }
        <tr>
            <td colspan="6" style="text-align:center;">
                @("合计(RMB)：￥" + viewModel.view_Order.total_money + "元")
            </td>
        </tr>
    </table>
    <table class=" definewidth m10">
        <tr>
            <td width="491"></td>
            <td align="right">
                <img src="~/Images/z1.png" width="209" />
            </td>
        </tr>
    </table>
</div>
